package com.joshjung.hover.interactive.projectiles
{
    import com.joshjung.collections.LinkedList;
    import com.joshjung.hover.functional.Viewport;

    public class Bullet extends ProjectileBase
    {
        //---------------------------------------------------------------------
        //
        //  Variables
        //
        //---------------------------------------------------------------------

        //---------------------------------------------------------------------
        //
        //  Constructor
        //
        //---------------------------------------------------------------------
        /**
         *  Constructor
         */
        public function Bullet(viewport : Viewport, loopList : LinkedList)
        {
            super(viewport, loopList, 0);

            force = 0.1;
            damage = 1;
            radius = 2;

            destroyOffscreen = true;
        }

        //---------------------------------------------------------------------
        //
        //  Methods
        //
        //---------------------------------------------------------------------
        override public function loop(elapsed : Number) : void
        {
            super.loop(elapsed);

            render();
        }

        protected function render() : void
        {
            graphics.clear();
            graphics.lineStyle(2, 0xFF00000, 1);
            graphics.beginFill(0x000000, 1.0);
            graphics.drawCircle(0, 0, radius);
            graphics.endFill();
        }
    }
}
